export const state = () => ({
  // 登录用户的基本信息,
  address: "",
  avatar: "",
  nickName: "",
  orgId: "",
  passWordFlag: "",
  phone: "",
  realName: "",
  sex: "",
  userCode: "",
  userId: "",
  userName: "",
  userType: "",
  wechatOpenid: "",
  weixinPhoneFlag: "",
  // vip信息
  isVip: false,
  vip: {}
});

export const mutations = {
  s_user(state, data) {
    state.userId = data.userId;
    state.nickName = data.nickName;
    state.avatar = data.avatar;
    state.userType = data.userType;
  },
  s_vip(state, data) {
    if (data.flag === 1) {
      state.isVip = true;
      state.vip = data;
    } else {
      state.isVip = false;
      state.vip = {};
    }
  }
};

export const actions = {};
